package com.cv.platform.controller.system.dashboard;

import com.cv.framework.common.pojo.Result;
import com.cv.platform.controller.system.dashboard.vo.DashboardRespVO;
import com.cv.platform.service.dashboard.DashboardService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

import static com.cv.framework.common.pojo.Result.success;

/**
 * 后台管理系统 - 仪表盘控制层
 *
 * @author Charles_XDXD
 */
@Tag(name = "后台管理系统 - 仪表盘控制层")
@RestController
@RequestMapping("/platform/dashboard")
public class SystemDashboardController {

    @Resource
    private DashboardService dashboardService;

    @GetMapping("info")
    public Result<DashboardRespVO> getStatistics() {
        return success(dashboardService.getDashboardInfo());
    }

}
